package com.springcloudalibaba.basefeign.service.product.api;

import com.springcloudalibaba.basefeign.service.product.vo.SellerProductVo;
import com.springcloudalibaba.bclass.base.BaseLoginUserInfo;
import com.springcloudalibaba.bclass.base.BaseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @描述: 基于 商品 的远程调用
 * @作者: lixing
 * @日期 2021/6/15 14:24
 */

/**
 * value值为服务名称：spring:application:name
 * path值为上下文名称开头：server:servlet:context-path
 */
@FeignClient(value="serviceProduct", path = "serviceProduct/product")
public interface ProductFeign {
    /**
     * @描述 修改商品库存
     * @作者 lixing
     * @日期 2021/6/17 8:50
     * @Param [SellerProductVo: id 库存编号，stock 库存变更数量]
     * @return com.eureka.bclass.base.BaseResult<java.lang.String>
     */
    @PostMapping("changeStock")
    BaseResult<String> changeStock(@RequestBody SellerProductVo vo);
}
